Add --hook flag to defer eval execution to WordPress lifecycle hooks#84
Merged
swissspidy merged 4 commits intomainfrom Feb 5, 2026
Merged
Add --hook flag to defer eval execution to WordPress lifecycle hooks#84swissspidy merged 4 commits intomainfrom
swissspidy merged 4 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add
Add --hook flag to defer eval execution to WordPress lifecycle hooks
Feb 1, 2026
--hook=<hook> flag to eval and shell commands
swissspidy
reviewed
Feb 2, 2026
swissspidy
reviewed
Feb 2, 2026
2 tasks
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
swissspidy
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Plan for
--hook=<hook>Flagevalandeval-filecommands--hook=<hook>parameter toEval_Commandclass--hook=<hook>parameter toEvalFile_Commandclass--hookis providedevalwith--hookflageval-filewith--hookflagSummary
Successfully implemented the
--hook=<hook>flag for bothevalandeval-filecommands. The implementation:--hookis provided, the code/file is registered as an action callback before WordPress loads--hookwith--skip-wordpresssince hooks require WordPress--hookis not provided, commands work exactly as beforeThe implementation follows WordPress conventions and matches the behavior of
add_action(), providing flexibility for users to execute code at any point in the WordPress lifecycle.Original prompt
--hook=<hook>flag toevalandshellto choose timing ideas#146✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.